<template>
	<div class="form-item-input">
		<el-row type="flex" justify="center">
			<el-col>
				<el-form :label-position="labelPosition" label-width="80px" :model="sizeForm">
				  <el-form-item :label="sizeForm.title+'：'">
				    <el-input v-model="sizeForm.value"></el-input>
				  </el-form-item>
				</el-form>
			</el-col>
		</el-row>
	 </div>
</template>

<script>
	export default {
	    data() {
	      return {
	        labelPosition: 'right',
	        sizeForm: {
			  id:'',
	          index: '',
	          title: '',
	          value:'',
	          maxlength: '',
	          minlength: '',
	          isNot:'1'
	        }
	      };
	    },
		props:['msgJsonApp'],
		mounted() {
			console.log(JSON.stringify(this.sizeForm))
			this.sizeForm=JSON.parse(this.msgJsonApp)
		},
		methods:{
			showData(){
				var key = this.sizeForm.title
				var value = this.sizeForm.value
				var list = {}
				list[key] = value
				return list
			}
		},
		watch: {
			'msgJsonApp': {
				handler(newValue, oldValue) {
				   this.sizeForm=JSON.parse(this.msgJsonApp)
				},
				deep: true
			}
		}
	  }
</script>

<style>
	.layui-form-label{
		width: 100%;
		font-size: 12px;
	}
	.form-item-input{
		width: 60%;
		margin: auto;
		padding: 10px 10px 10px 10px;
		
	}
</style>
